Computer applications use a plurality of resources including database objects. Each database allocates an agent to an application and serves it. In current practice agents are allocated to applications, and applications are grouped at random. The agents are initialized and then after serving the application they are kept initialized for some time, in case the same application needs them, else they are allocated to some other application at random thus they need to be reinitialized with information like indexes, statement heap, query heap etc. This re-initialization can be a big overhead and can have adverse impact on throughput.